//字符串
//模板字符串的特殊应用
let a = 1, b = 2
let add = (a, b, c, d) => {
    console.log(a)
    console.log(b)
    console.log(c)
    console.log(d)
}
add(1, 2, 3, 4)
add`这里使用模板字符串，我是变量a:${a},我是变量b:${b}`

//正则匹配
//修饰符：g(global)、i(ignore)、m(multiple)
//ES6：y(sticky粘连修饰符)、u(unicode编码修饰符)
let str = 'aaa_aa_a'
let reg = /a+/g
console.log(reg.exec(str),reg.lastIndex) //[aaa,index:0] 0
console.log(reg.exec(str),reg.lastIndex)//[aa,index:4]
console.log(reg.exec(str),reg.lastIndex)//[a,index:7]
console.log(reg.exec(str),reg.lastIndex)//null